Skip to content

Conversation

ronjalh
Copy link
Member

@ronjalh ronjalh commented Nov 11, 2026 •

What

Makes the hover and pressed state of the buttons, the menus and the result rows clear in both themes (peer feedback, #167). The first version was tried by hand, and the states it had not covered were fixed (see docs/AI_USAGE.md).

  • Buttons (filters, sort, "Clear filters"): a 2 px edge in the text color on hover. A button that cannot be used (aria-disabled) does not react. While its menu is open, or while it is pressed (active:, which a phone needs), it has the colors of a highlighted menu choice, so the state can be seen. It was white text on the tan button in dark mode, 2.4:1.
  • "Clear filters" is red (--danger) on hover and when pressed.
  • Result rows: the text shadow is gone (each browser blends it differently). The first cell gets a 4 px edge in the text color.
  • Menus: a 1 px edge in the text color (as the search field has). The choice under the pointer or the keyboard is navy with light text in light mode and light tan with dark text in dark mode (new tokens --menu-highlight-bg and --menu-highlight-text). A choice that cannot be chosen is not highlighted by the pointer; the keyboard gets a 2 px edge there.
  • Sort button on a phone: below 600 px it is in the row of the last filter when there is room (the group of the filters is display: contents there and is still a group named "Filters" in the accessibility tree).

Measured

Real browser (Chromium), light and dark:

Light Dark
Button edge against the page 12.8:1 7.4:1
"Clear filters" text on the danger color 6.6:1 8.5:1
Open button, text on its color 15.9:1 9.0:1
Highlighted choice, text on its color 15.9:1 9.0:1
Highlighted choice against the menu 15.9:1 6.6:1

Checks

tsc, eslint and prettier are clean; 330 tests in src/tests/components, src/tests/pages and src/tests/styles pass. 15 end-to-end tests pass (e2e/hover.e2e.ts is new and measures the edge, the danger color, the open button, the menu edge, the highlighted choice and the choice that cannot be chosen, in both themes; plus the accessibility and the elements flow tests). The full test run was not completed here. Only Chromium is checked. The rows still have no color change in light mode (the design has none).

Closes #171

🤖 Generated with Claude Code

The buttons get a 2 px edge on hover and when pressed, "Clear filters" turns to the danger color, and the text shadow of the rows is replaced by a 4 px edge on the first cell. An e2e test measures the edge and the danger color in both themes.

Closes #171
@ronjalh ronjalh self-assigned this Nov 11, 2026
Ronja added 8 commits November 11, 2026 19:18
The menu popup is almost the color of the page, so it gets a 1 px edge in the text color like the search field. The choice under the pointer or the keyboard gets the text color of the buttons and a 2 px edge inside it: the text color of dark mode was 1.5:1 on the light tan of a highlighted choice.

Refs #171
…on in their row on a phone

An open menu button keeps the text color of the button (the Button variant made it white, 2.4:1 on the tan button of dark mode). A button that cannot be used does not react to the pointer. Below 600 px the sort button shares the row of the last filter when there is room.

Refs #171
…sabled ones still

The choice under the pointer or the keyboard is navy with light text in light mode and light tan with dark text in dark mode, instead of the near-invisible beige and light text on light tan. No edge on pointer hover. A choice that cannot be chosen is not highlighted by the pointer, and the keyboard gets a 2 px edge there.

Refs #171
…and keep Clear filters red

An open or pressed button has the colors of a highlighted menu choice. The pressed Clear filters is red, as on hover.

Refs #171
@ronjalh ronjalh marked this pull request as ready for review November 11, 2026 18:34
@ronjalh ronjalh requested a review from a team as a code owner November 11, 2026 18:34
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant